﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ALinq.BBS.DataAccess
{
    partial class ObjectIdentity
    {
        public const int PostIdentity = 1;

    }

    class AutoField
    {
        static readonly Object postIDLock = new object();
        static readonly Object replyIDLock = new object();

        //public static int NewPostID(Database db)
        //{
        //    lock (postIDLock)
        //    {

        //        var item = db.ObjectIdentities.Where(o => o.ID == ObjectIdentity.PostIdentity).Single();
        //        item.MaxID++;
        //        db.SubmitChanges();

        //        return item.MaxID;
        //    }
        //}
    }
}
